import React, { PureComponent } from 'react';
import { Input, Col, Form } from 'antd';
import { connect } from 'dva';
import Tab from "../tab"
import "./form.less"
import "../../Common.less"
class UnionComponent extends PureComponent {
    constructor(props) {
        super(props);
        this.state = {

        }
    }
    componentDidMount() {
        if (this.props.onLoaded) {
            this.props.onLoaded(this);
        }

    }

    render() {
        const { getFieldDecorator, setFieldsValue } = this.props.form;
        return (
            <div className="absMiddle topComponent">
                <Tab menus={[{
                    name: '构件信息'
                }, {
                    name: '盖梁构件'
                }, {
                    name: '墩柱构件'
                }, {
                    name: '基础构件'
                }]} index={0}></Tab>
                <div className="absMiddle">
                    <Form
                    style={{marginTop:"20px"}}
                        labelCol={{ span: 7 }}
                        wrapperCol={{ span: 17 }}
                    >
                        <Col span={12}>
                            <Form.Item label='构件名称'>
                                {getFieldDecorator('designStage', {
                                    rules: [
                                        { required: true, message: '构件名称' }
                                    ]
                                })(
                                    <Input type="text" />
                                )}
                            </Form.Item>
                        </Col>
                        <Col span={12}>
                            <Form.Item label='构件类型'>
                                {getFieldDecorator('designStage', {
                                    rules: [
                                        { required: true, message: '构件类型' }
                                    ]
                                })(
                                    <Input type="text" />
                                )}
                            </Form.Item>
                        </Col>
                        <Col span={12}>
                            <Form.Item label='所属线路'>
                                {getFieldDecorator('designStage', {
                                    rules: [
                                        { required: true, message: '所属线路' }
                                    ]
                                })(
                                    <Input type="text" />
                                )}
                            </Form.Item>
                        </Col>
                        <Col span={12}>
                            <Form.Item label='所属桥梁'>
                                {getFieldDecorator('designStage', {
                                    rules: [
                                        { required: true, message: '所属桥梁' }
                                    ]
                                })(
                                    <Input type="text" />
                                )}
                            </Form.Item>
                        </Col>
                    </Form>

                </div>

            </div>
        );
    }
}

export default connect(
    ({

    }) => {
        return {};
    },
    dispatch => ({

    })
)(Form.create('UnionComponent', {

})(UnionComponent));